# Copyright 2018- The Pixie Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
load("//bazel:pl_build_system.bzl", "pl_sh_test")

sh_library(
    name = "common_library",
    srcs = glob(["*.sh"]),
)

pl_sh_test(
    name = "px_on_gke_ubuntu_test",
    timeout = "long",
    srcs = ["test_px_on_gke.sh"],
    args = ["UBUNTU"],
    tags = ["manual"],
    deps = [
        ":common_library",
        "@bazel_tools//tools/bash/runfiles",
    ],
)

pl_sh_test(
    name = "px_on_gke_ubuntu_containerd_test",
    timeout = "long",
    srcs = ["test_px_on_gke.sh"],
    args = ["UBUNTU_CONTAINERD"],
    tags = ["manual"],
    deps = [
        ":common_library",
        "@bazel_tools//tools/bash/runfiles",
    ],
)

pl_sh_test(
    name = "px_on_gke_cos_test",
    timeout = "long",
    srcs = ["test_px_on_gke.sh"],
    args = ["COS"],
    tags = ["manual"],
    deps = [
        ":common_library",
        "@bazel_tools//tools/bash/runfiles",
    ],
)

pl_sh_test(
    name = "px_on_gke_cost_containerd_test",
    timeout = "long",
    srcs = ["test_px_on_gke.sh"],
    args = ["COS_CONTAINERD"],
    tags = ["manual"],
    deps = [
        ":common_library",
        "@bazel_tools//tools/bash/runfiles",
    ],
)

pl_sh_test(
    name = "px_on_minikube_test",
    timeout = "long",
    srcs = ["test_px_on_minikube.sh"],
    args = [
        "minikube",
        "docker",
    ],
    tags = ["manual"],
    deps = [
        ":common_library",
        "@bazel_tools//tools/bash/runfiles",
    ],
)

pl_sh_test(
    name = "px_on_kind_test",
    timeout = "long",
    srcs = ["test_px_on_kind.sh"],
    tags = ["manual"],
    deps = [
        ":common_library",
        "@bazel_tools//tools/bash/runfiles",
    ],
)
